package javax;

import java.util.Scanner;

public class Okt {
    public static String strZip(String str){
        String strObj = " ";
        int NumCount =1;
        char chr = str.charAt(0);
        for (int i = 1;i<str.length();i++){
            if (chr == str.charAt(i)){
                NumCount++;
            }else {
                strObj += chr+NumCount;
                chr = str.charAt(i);
                NumCount =1 ;
            }
        }
        return strObj += chr+NumCount;
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String s = strZip(str);
        System.out.println(s);
    }
}
